function getchars {
i = document.getElementById("msg");
chars_used = i.lenght;
chars_remaining = i.maxlength - chars_used;
t = document.getElementById("rchars");
t. value = chars_remaining
}